import request from '@/utils/request'

// 查询借阅记录列表
export function borrowList(query) {
  return request({
    url: '/book/lend/getLendMessage',
    method: 'get',
    params: query
  })
}

// 新增借阅记录
export function addBorrowList(data) {
  return request({
    url: '/book/lend/add',
    method: 'post',
    data: data
  })
}

// 修改借阅记录
export function updateBorrowList(data) {
  return request({
    url: '/book/lend/edit',
    method: 'post',
    data: data
  })
}


// 删除借阅记录
export function deleteBorrowList(data) {
  return request({
    url: '/book/lend/updateIsDelete',
    method: 'post',
    data: data
  })
}

// 获得图书名称
export function getBookById(bookId) {
  return request({
    url: '/bookManage/selectBookById',
    method: 'get',
    params: { bookId: bookId }
  });
}

